com.supermap.ar
Class World
- java.lang.Object
-
- com.supermap.ar.World
-
public class World extends java.lang.Object
AR scene class A container of all objects rendered in an AR scene
-
-
Constructor Summary
Constructors Constructor and Description World(android.content.Context context)
Constructor for creating AR scene instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addArObject(ArObject arObject)
Adds arObject objects into a scenevoid
clearWorld()
Removes a scenedouble
getAltitude()
Gets the altitudejava.util.List<ArObjectList>
getArObjectLists()
Gets the ArObject list in a sceneandroid.content.Context
getContext()
Gets contextdouble
getLatitude()
Gets the user's altitudedouble
getLongitude()
Gets the user' longitudevoid
onPause()
Pause the world scenevoid
onResume()
Evoke the world sceneboolean
remove(ArObject arObject)
Removes arObject from a scenevoid
setGeoPosition(double latitude, double longitude, double altitude)
Sets the user position
-
-
-
Constructor Detail
-
World
public World(android.content.Context context)
Constructor for creating AR scene instance- Parameters:
context
- The context.
-
-
Method Detail
-
onResume
public void onResume()
Evoke the world scene
-
onPause
public void onPause()
Pause the world scene
-
getContext
public android.content.Context getContext()
Gets context- Returns:
- context
-
addArObject
public final void addArObject(ArObject arObject)
Adds arObject objects into a scene- Parameters:
arObject
- arObject
-
remove
public boolean remove(ArObject arObject)
Removes arObject from a scene- Parameters:
arObject
- arObject- Returns:
- removal was successful.
-
clearWorld
public void clearWorld()
Removes a scene
-
getArObjectLists
public java.util.List<ArObjectList> getArObjectLists()
Gets the ArObject list in a scene- Returns:
- the ArObject list
-
getLongitude
public double getLongitude()
Gets the user' longitude- Returns:
- The longitude
-
getAltitude
public double getAltitude()
Gets the altitude- Returns:
- the altitude
-
getLatitude
public double getLatitude()
Gets the user's altitude- Returns:
- The latitude
-
setGeoPosition
public void setGeoPosition(double latitude, double longitude, double altitude)
Sets the user position- Parameters:
latitude
- Latitudelongitude
- Longitudealtitude
- the altitude
-
-